package cn.itcast.zt.java8.model.anno;

import lombok.Data;

/**
 * 通过注解（增加字段描述符）+反射（获取描述符数据做逻辑处理）实现判断逻辑的重复代码消除
 * create by zhangtian105 on 2022/2/17
 */

@BankAPI(url = "/bank/createUser", desc = "创建用户接口")
@Data
public class CreateUserAPI extends AbstractAPI {
    @BankAPIField(order = 1, type = "S", length = 10)
    private String name;
    @BankAPIField(order = 2, type = "S", length = 18)
    private String identity;
    @BankAPIField(order = 4, type = "S", length = 11) //注意这里的order需要按照API表格中的顺序
    private String mobile;
    @BankAPIField(order = 3, type = "N", length = 5)
    private int age;
}
